//
//  ZXBaseTableViewCell.m
//  MortgageHelper
//
//  Created by fly Mac on 16/7/8.
//  Copyright © 2016年 zhangxiang. All rights reserved.
//

#import "ZXBaseTableViewCell.h"

@implementation ZXBaseTableViewCell

+ (id)cellForTableView:(UITableView *)tableView cellIdentifier:(NSString *)cellID
{
    return [[self class] cellForTableView:tableView fromNibName:NSStringFromClass([self class]) cellIdentifier:cellID];
}

+ (id)cellForTableView:(UITableView *)tableView fromNibName:(NSString *)nibName cellIdentifier:(NSString *)cellID
{
    ZXBaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    
    if (cell == nil)
    {
        UINib *nib = [UINib nibWithNibName:nibName bundle:nil];
        [tableView registerNib:nib forCellReuseIdentifier:cellID];
        cell = [tableView dequeueReusableCellWithIdentifier:cellID];
        [cell reset];
    }
    else
    {
        [cell reset];
    }
    
    return cell;
}

-(void)reset{
    
}

-(void)refreshUIWithModel:(id)sender
{
    
}
- (void)awakeFromNib
{
    [super awakeFromNib];
    
    [self customInit];
}
- (void)customInit
{
    self.backgroundColor = [UIColor whiteColor];
    self.contentView.backgroundColor = [UIColor whiteColor];
    
    UIView *_bgv = [UIView new];
    //    _bgv.backgroundColor = K_HOME_CELL_SelectView_BG;   //选中背景色
    self.selectedBackgroundView = _bgv;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
